<template>
	<view>
		<view class="msg-con">
			<view class="msg-item" @click="goPath">
				<image :src="$IMG_URL+'workOrder.png'" class="item-img"></image>
				<view style="margin-left: 19rpx;">工单消息</view>
				<view v-if="num>0" class="flex-row" style="margin-left: auto;">
					<u-badge :absolute="false" bgColor="#FF3902" numberType="overflow" type="warning" max="999"
						value="99"></u-badge>
					<image :src="$IMG_URL+'jump.png'" style="width: 31rpx;height: 31rpx;margin-left: 15rpx;">
					</image>
				</view>
				<image v-else :src="$IMG_URL+'jump.png'" style="width: 31rpx;height: 31rpx;margin-left: auto;">
				</image>
			</view>
			<u-line color="#d8d8d8"></u-line>
			<view class="msg-item">
				<image :src="$IMG_URL+'workOrder.png'" class="item-img"></image>
				<view style="margin-left: 19rpx;">平台消息</view>
				<view v-if="num>0" class="flex-row" style="margin-left: auto;">
					<u-badge :absolute="false" bgColor="#FF3902" numberType="overflow" type="warning" max="999"
						value="99"></u-badge>
					<image :src="$IMG_URL+'jump.png'" style="width: 31rpx;height: 31rpx;margin-left: 15rpx;">
					</image>
				</view>
				<image v-else :src="$IMG_URL+'jump.png'" style="width: 31rpx;height: 31rpx;margin-left: auto;">
				</image>
			</view>
			<u-line color="#d8d8d8"></u-line>
			<view class="msg-item">
				<image :src="$IMG_URL+'rewardsAndPunishments.png'" class="item-img"></image>
				<view style="margin-left: 19rpx;">奖惩消息</view>
				<view v-if="num>0" class="flex-row" style="margin-left: auto;">
					<u-badge :absolute="false" bgColor="#FF3902" numberType="overflow" type="warning" max="999"
						value="99"></u-badge>
					<image :src="$IMG_URL+'jump.png'" style="width: 31rpx;height: 31rpx;margin-left: 15rpx;">
					</image>
				</view>
				<image v-else :src="$IMG_URL+'jump.png'" style="width: 31rpx;height: 31rpx;margin-left: auto;">
				</image>
			</view>

		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				num: 99,
			}
		},
		methods: {
			goPath() {
				uni.navigateTo({
					url: '/pages/messageList/messageList'
				})
			},
		}
	}
</script>

<style scoped lang="scss">
	.msg-con {
		width: 100vw;
		background: #FFFFFF;
		padding: 0 31rpx;

		.msg-item {
			display: flex;
			align-items: center;
			padding: 27rpx 0;
			font-size: 27rpx;
			color: #000000;

			.item-img {
				width: 49rpx;
				height: 49rpx;
			}
		}
	}
</style>